#ifndef HRV_H
#define HRV_H

#include <QWidget>
#include "Beans/databeans.h"
#include <QtCharts>
#include "qchart.h"
#include <QtCharts/QChartView>
#include <QtCharts/QPieSeries>
#include <QtCharts/QPieSlice>
#include <QtCharts/QAbstractBarSeries>
#include <QtCharts/QPercentBarSeries>
#include <QtCharts/QStackedBarSeries>
#include <QtCharts/QBarSeries>
#include <QtCharts/QBarSet>
#include <QtCharts/QLineSeries>
#include <QtCharts/QSplineSeries>
#include <QtCharts/QScatterSeries>
#include <QtCharts/QAreaSeries>
#include <QtCharts/QLegend>
#include <QtCharts/QBarCategoryAxis>
#include <QtCharts/QValueAxis>
#include <QtCharts/QChartGlobal>
namespace Ui {
class HRV;
}

class HRV : public QWidget
{
    Q_OBJECT

public:
    explicit HRV(QWidget *parent = nullptr);
    ~HRV();
    void setValue(DataBeans db);

private:
    Ui::HRV *ui;
    QChart *CreateLineChart_HRV();
    QChart *CreateLineChart_AR();
    void setHRVData(QList<int>rr);
    void setARData(QList<double>freq,QList<double>psd);

    QChart *chart,*chart_AR;
    QLineSeries *Series_HRV,*Series_AR;
    QValueAxis *xAxis_HRV,*xAxis_AR;
    QValueAxis *yAxis_HRV,*yAxis_AR;
    void InitialAxis_Chart_HRV();
    void InitialAxis_Chart_AR();
};

#endif // HRV_H
